package com.changhongit.order.util;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.datasource.DriverManagerDataSource;

@SuppressWarnings("all")
public class ImpalaJdbc {

	public static JdbcTemplate getJdbcTemplate() {
		try {
			DriverManagerDataSource dataSource = new DriverManagerDataSource();
			dataSource.setDriverClassName("com.cloudera.impala.jdbc41.Driver");
			dataSource.setUrl("jdbc:impala://172.26.100.60:20000/kududb;UID=impala_read;PWD=Chit2022!");
			dataSource.setUsername("impala_read");
			dataSource.setPassword("Chit2022!");
			JdbcTemplate jdbcTemplate = new JdbcTemplate();
			jdbcTemplate.setDataSource(dataSource);

			return jdbcTemplate;
		} catch (Exception e) {
		}
		return null;
	}

}
